package com.xxb.test;

import java.util.List;

import com.xxb.dao.ProductDao;
import com.xxb.entity.Product;

import junit.framework.TestCase;

public class ProductDaoTestCase extends TestCase{
	private ProductDao dao;
	@Override
	protected void setUp() throws Exception {
		dao = new ProductDao();
	}

	public void testFindall(){
		List<Product> list = dao.findAll();
		assertEquals(2,list.size());
		
	}
	
	public void testfindBytid(){
		List<Product> list = dao.fintBytid(7);
		assertEquals(7,list.size());
	}
	
	public void testFindbyid(){
		Product p = dao.findByid(7);
		assertNotNull(p);
	}
}
